package com.zjx.springcloud.entities;

import com.fasterxml.jackson.annotation.JsonInclude;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * http请求返回的最外层对象
 * Created by 吴玮
 * 2019-07-17
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@Accessors(chain = true)
public class ResultVO<T> implements Serializable {

    private static final long serialVersionUID = 3068837394742385883L;

    /** 错误码. */
    private Integer code;

    /** 提示信息. */
    private String message;

    /** 具体内容. */
    private T data;

    public ResultVO() {
    }

    public ResultVO(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data =data;
    }
    public ResultVO(Integer code,String message) {
        this.code = code;
        this.message = message;

    }


}